function update_property() {
    var url = '/property/save';
    var params = {
        id:          getElement('id').value,
        value:       getElement('value').value,
        tg_format:   'json'
    };
    var data = queryString(params);

    function update_property_callback(result) {
        result = evalJSONRequest(result);
        if (result['success'] == true) {
        }
    }

    var req = getXMLHttpRequest();
    req.open('POST', url, true);
    req.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=utf-8;');
    sendXMLHttpRequest(req, data).addCallback(update_property_callback);
}

var handleKeyPress = function(e) {
  if (!e) var e = window.event;
  var consume = false;
  switch(e.keyCode)
    {
    case 13: // Ctrl-Enter
    case 10: // Ctrl-Enter on IE PC
    case 77: // Ctrl-Enter is "M" on some platforms
      if(e.ctrlKey)
        {
        update_property();toggle('edit_property');return false;
        consume = true;
        }
      break;
      }
  e.cancelBubble = consume;
  if(consume)
    if (e.stopPropagation) e.stopPropagation();
  return(!consume);
};
